package com.atguigu.gmall.order.service;

import com.atguigu.gmall.model.enums.ProcessStatus;
import com.atguigu.gmall.model.order.OrderDetail;
import com.atguigu.gmall.model.order.OrderInfo;

import java.util.List;
import java.util.Map;

/**
 * @Author: lx
 * @Time: 15:02
 * @Description:
 */
public interface OrderInfoService {
    boolean hasStock(OrderDetail orderDetail);

    Long saveOrderInfo(OrderInfo orderInfo);

    void cancelOrderByOrderId(Long orderId);

    OrderInfo getOrderInfo(Long orderId);

    void updateOrderStatus(Long orderId);

    //重载方法
    public Map<String, Object> initWareOrder(Long orderId);
    //发消息给库存系统 减库存的时候 组合发送的消息内容
    public Map<String, Object> initWareOrder(OrderInfo orderInfo);

    List<OrderInfo> orderSplit(Long orderId, String wareSkuMap);
    //更新原始订单的订单状态为已折单  进度状态为已折单
    public void updateOrderStatus(Long orderId, ProcessStatus processStatus);
}
